import Vue from 'vue'
import Router from 'vue-router'
// import HelloWorld from '@/components/HelloWorld'

Vue.use(Router)

const RouteView = {
  name: 'RouteView',
  render: h => h('router-view')
}

export default new Router({
  scrollBehavior(to, from, savedPosition) {
    return {
      x: 0,
      y: 0
    }
  },
  routes: [{
    path: '/',
    name: 'Index',
    component: RouteView,
    redirect: '/index',
    children: [{
      path: '/index',
      name: '银盛助手',
      component: () => import('../pages/index/index_o.vue'),
      meta: {
        title: '银盛助手'
      }
    }]
  }, {
    path: '/information',
    name: 'information',
    component: r => require.ensure([], () => r(require('../pages/information/information.vue')), 'web_one'),
    meta: {
      title: '数据'
    }
  },
    {
      path: '/performanceSubsidiary',
      name: 'performanceSubsidiary',
      component: r => require.ensure([], () => r(require('../pages/information/performanceSubsidiary.vue')), 'web_one'),
      meta: {
        title: '业绩明细'
      }
    },
    {
      path: '/LossAnalysis',
      name: 'LossAnalysis',
      component: r => require.ensure([], () => r(require('../pages/information/LossAnalysis.vue')), 'web_one'),
      meta: {
        title: '流失分析'
      }
    },
    {
      path: '/TeamPerformance',
      name: 'TeamPerformance',
      component: r => require.ensure([], () => r(require('../pages/information/TeamPerformance.vue')), 'web_one'),
      meta: {
        title: '团队名称业绩'
      }
    },

    // 我的
    {
      path: '/my',
      name: 'my',
      component: r => require.ensure([], () => r(require('../pages/my/my.vue')), 'web_one'),
      meta: {
        title: '我的'
      }
    },
    {
      path: '/My_wallet',
      name: 'My_wallet',
      component: r => require.ensure([], () => r(require('../pages/my/My_wallet.vue')), 'web_one'),
      meta: {
        title: '我的钱包'
      }
    },
    {
      path: '/AccountDetails',
      name: 'AccountDetails',
      component: r => require.ensure([], () => r(require('../pages/my/AccountDetails.vue')), 'web_one'),
      meta: {
        title: '账户明细'
      }
    },
    {
      path: '/balanceOfwithdrawal',
      name: 'balanceOfwithdrawal',
      component: r => require.ensure([], () => r(require('../pages/my/balanceOfwithdrawal.vue')), 'web_one'),
      meta: {
        title: '余额提现'
      }
    },
    {
      path: '/Selectbankcard',
      name: 'Selectbankcard',
      component: r => require.ensure([], () => r(require('../pages/my/Selectbankcard.vue')), 'web_one'),
      meta: {
        title: '选择提现银行卡'
      }
    },
    {
      path: '/bank_administration',
      name: 'bank_administration',
      component: r => require.ensure([], () => r(require('../pages/my/bank_administration.vue')), 'web_one'),
      meta: {
        title: '银行卡管理'
      }
    },
    {
      path: '/addBank',
      name: 'addBank',
      component: r => require.ensure([], () => r(require('../pages/my/addBank.vue')), 'web_one'),
      meta: {
        title: '添加银行卡'
      }
    },
    {
      path: '/About_Us',
      name: 'About_Us',
      component: r => require.ensure([], () => r(require('../pages/my/About_Us.vue')), 'web_one'),
      meta: {
        title: '关于银盛助手'
      }
    },
    {
      path: '/securitySettings',
      name: 'securitySettings',
      component: r => require.ensure([], () => r(require('../pages/my/securitySettings.vue')), 'web_one'),
      meta: {
        title: '安全设置'
      }
    },
    {
      path: '/ReplacePphone',
      name: 'ReplacePphone',
      component: r => require.ensure([], () => r(require('../pages/my/ReplacePphone.vue')), 'web_one'),
      meta: {
        title: '更换登录手机号'
      }
    },
    {
      path: '/changePassword',
      name: 'changePassword',
      component: r => require.ensure([], () => r(require('../pages/my/changePassword.vue')), 'web_one'),
      meta: {
        title: '重置登录密码'
      }
    },
    {
      path: '/myProfile',
      name: 'myProfile',
      component: r => require.ensure([], () => r(require('../pages/my/myProfile.vue')), 'web_one'),
      meta: {
        title: '我的资料'
      }
    },
    {
      path: '/authentication',
      name: 'authentication',
      component: r => require.ensure([], () => r(require('../pages/authentication/authentication.vue')), 'web_one'),
      meta: {
        title: '账号实名'
      }
    },

    // 登录
    {
      path: '/login',
      name: 'login',
      component: r => require.ensure([], () => r(require('../pages/logIn/login.vue')), 'web_one'),
      meta: {
        title: '验证码登录'
      }
    },
    {
      path: '/Passwordlogin',
      name: 'Passwordlogin',
      component: r => require.ensure([], () => r(require('../pages/logIn/Passwordlogin.vue')), 'web_one'),
      meta: {
        title: '密码登录'
      }
    },


    // 商户查询
    {
      path: '/MerchantsQuery',
      name: 'MerchantsQuery',
      component: r => require.ensure([], () => r(require('../pages/MerchantsQuery/MerchantsQuery.vue')), 'web_one'),
      meta: {
        title: '商户查询'
      }
    },
    {
      path: '/BusinessInformation',
      name: 'BusinessInformation',
      component: r => require.ensure([], () => r(require('../pages/MerchantsQuery/BusinessInformation.vue')), 'web_one'),
      meta: {
        title: '商户信息'
      }
    },
    {
      path: '/commercial_transfer',
      name: 'commercial_transfer',
      component: r => require.ensure([], () => r(require('../pages/MerchantsQuery/commercial_transfer.vue')), 'web_one'),
      meta: {
        title: '商户划拨'
      }
    },
    {
      path: '/transfer_data',
      name: 'transfer_data',
      component: r => require.ensure([], () => r(require('../pages/MerchantsQuery/transfer_data.vue')), 'web_one'),
      meta: {
        title: '选择划拨的对象'
      }
    },
    {
      path: '/MerchantRate',
      name: 'MerchantRate',
      component: r => require.ensure([], () => r(require('../pages/MerchantsQuery/MerchantRate.vue')), 'web_one'),
      meta: {
        title: '商户费率'
      }
    },


    // 团队管理

    {
      path: '/teamManagement',
      name: 'teamManagement',
      component: r => require.ensure([], () => r(require('../pages/managemenTteam/teamManagement.vue')), 'web_one'),
      meta: {
        title: '团队管理'
      }
    },
    {
      path: '/addgroup',
      name: 'addgroup',
      component: r => require.ensure([], () => r(require('../pages/managemenTteam/addgroup.vue')), 'web_one'),
      meta: {
        title: '新建团队'
      }
    },
    {
      path: '/pending_apply',
      name: 'pending_apply',
      component: r => require.ensure([], () => r(require('../pages/managemenTteam/pending_apply.vue')), 'web_one'),
      meta: {
        title: '待处理申请'
      }
    },
    {
      path: '/pending_Name',
      name: 'pending_Name',
      component: r => require.ensure([], () => r(require('../pages/managemenTteam/pending_Name.vue')), 'web_one'),
      meta: {
        title: '团队名称'
      }
    },
    {
      path: '/user_Details',
      name: 'user_Details',
      component: r => require.ensure([], () => r(require('../pages/managemenTteam/user_Details.vue')), 'web_one'),
      meta: {
        title: '用户详情'
      }
    },
    {
      path: '/Team_Changes',
      name: 'Team_Changes',
      component: r => require.ensure([], () => r(require('../pages/managemenTteam/Team_Changes.vue')), 'web_one'),
      meta: {
        title: '团队变更'
      }
    },
    {
      path: '/post_Changes',
      name: 'post_Changes',
      component: r => require.ensure([], () => r(require('../pages/managemenTteam/post_Changes.vue')), 'web_one'),
      meta: {
        title: '职务变更'
      }
    },
    {
      path: '/release_relationship',
      name: 'release_relationship',
      component: r => require.ensure([], () => r(require('../pages/managemenTteam/release_relationship.vue')), 'web_one'),
      meta: {
        title: '解除关系'
      }
    },

    {
      path: '/invitation',
      name: 'invitation',
      component: r => require.ensure([], () => r(require('../pages/managemenTteam/invitation.vue')), 'web_one'),
      meta: {
        title: '邀请成员'
      }
    },

    {
      path: '/TeamInvited',
      name: 'TeamInvited',
      component: r => require.ensure([], () => r(require('../pages/managemenTteam/TeamInvited.vue')), 'web_one'),
      meta: {
        title: '团队邀请'
      }
    },

    {
      path: '/groupRate',
      name: 'groupRate',
      component: r => require.ensure([], () => r(require('../pages/managemenTteam/groupRate.vue')), 'web_one'),
      meta: {
        title: '团队费率'
      }
    },

    {
      path: '/memberRate',
      name: 'memberRate',
      component: r => require.ensure([], () => r(require('../pages/managemenTteam/memberRate.vue')), 'web_one'),
      meta: {
        title: '成员费率'
      }
    },


    {
      path: '/Shangtenant',
      name: 'Shangtenant',
      component: r => require.ensure([], () => r(require('../pages/MerchantsNet/Shangtenant.vue')), 'web_one'),
      meta: {
        title: '商户入网'
      }
    },

    {
      path: '/terminal',
      name: 'terminal',
      component: r => require.ensure([], () => r(require('../pages/terminalManagement/terminal.vue')), 'web_one'),
      meta: {
        title: '终端管理'
      }
    }

  ]
})
